const express = require('express')
const router = express.Router()

// 导入路由模块
const adminRoutes = require('./admin')
const uploadRoutes = require('./upload')
const miniappRoutes = require('./miniapp')

// 注册路由
router.use('/admin', adminRoutes)
router.use('/upload', uploadRoutes)
router.use('/miniapp', miniappRoutes)

// 测试路由
router.get('/test', (req, res) => {
  res.json({
    code: 200,
    message: '服务器运行正常'
  })
})

module.exports = router 